<template>
  <div>
    <el-container>
      <!--上半区域-->
      <el-header class="layout-header">
        <h1>
          <img src="../assets/1.jpg" style="width: 40px;vertical-align: middle;margin-top: -10px">
          医往情深住院管理系统
        </h1>
      </el-header>
      <!--下半区域-->
      <el-container class="layout-body">p
        <!--下半区域的左侧-->
        <el-aside class="layout-aside">
          <el-menu
              :default-active="$router.currentRoute.path"
              class="el-menu-vertical-demo"
              background-color="#425c79"
              text-color="#fff"
              router
              active-text-color="#ffd04b">
            <!-- 主页 -->
            <el-menu-item index="/">
              <i class="el-icon-s-home"></i>
              <span>主页</span>
            </el-menu-item>
            <!--医生信息管理-->
            <el-submenu index="1">
              <template slot="title">
                <i class="el-icon-star-on"></i>
                <span>医生信息管理</span>
              </template>
              <el-menu-item-group>
                <el-menu-item index="/admin/select/doctor">
                  <template slot="title">
                    <i class="el-icon-search"></i>
                    <span>医生信息查询</span>
                  </template>
                </el-menu-item>
                <el-menu-item index="/admin/user/add-new">
                  <template slot="title">
                    <i class="el-icon-circle-plus-outline"></i>
                    <span>医生信息添加</span>
                  </template>
                </el-menu-item>
              </el-menu-item-group>
            </el-submenu>
            <!--病床信息管理-->
            <el-submenu index="2">
              <template slot="title">
                <i class="el-icon-star-on"></i>
                <span>病床信息管理</span>
              </template>
              <el-menu-item-group>
                <el-menu-item index="/admin/select/bed">
                  <template slot="title">
                    <i class="el-icon-search"></i>
                    <span>病床信息查询</span>
                  </template>
                </el-menu-item>
                <el-menu-item index="/admin/hospitalbed/bedadd">
                  <template slot="title">
                    <i class="el-icon-circle-plus-outline"></i>
                    <span>病床信息添加</span>
                  </template>
                </el-menu-item>
              </el-menu-item-group>
            </el-submenu>
            <!--病人信息管理-->
            <el-submenu index="3">
              <template slot="title">
                <i class="el-icon-star-on"></i>
                <span>病人信息管理</span>
              </template>
              <el-menu-item-group>
                <el-menu-item index="/admin/patient">
                  <template slot="title">
                    <i class="el-icon-search"></i>
                    <span>病人信息查询</span>
                  </template>
                </el-menu-item>
                <el-menu-item index="/admin/patient/add-new">
                  <template slot="title">
                    <i class="el-icon-circle-plus-outline"></i>
                    <span>病人信息添加</span>
                  </template>
                </el-menu-item>
              </el-menu-item-group>
            </el-submenu>
            <!--收费信息管理-->
            <el-submenu index="4">
              <template slot="title">
                <i class="el-icon-star-on"></i>
                <span>收费信息管理</span>
              </template>
              <el-menu-item-group>
                <el-menu-item index="/admin/feebasedcontent/FreeBasedView">
                  <template slot="title">
                    <i class="el-icon-search"></i>
                    <span>收费信息查询</span>
                  </template>
                </el-menu-item>
                <el-menu-item index="/admin/feebasedcontent/FreeBasedAddNewView">
                  <template slot="title">
                    <i class="el-icon-circle-plus-outline"></i>
                    <span>收费信息添加</span>
                  </template>
                </el-menu-item>
              </el-menu-item-group>
            </el-submenu>
            <!--统计分析-->
            <el-submenu index="5">
              <template slot="title">
                <i class="el-icon-star-on"></i>
                <span>统计分析</span>
              </template>
              <el-menu-item-group>
                <el-menu-item index="/admin/select/bedUseRatio">
                  <template slot="title">
                    <i class="el-icon-search"></i>
                    <span>病床利用率查询</span>
                  </template>
                </el-menu-item>
                <el-menu-item index="/admin/select/chargeDetail">
                  <template slot="title">
                    <i class="el-icon-search"></i>
                    <span>收费明细查询</span>
                  </template>
                </el-menu-item>
              </el-menu-item-group>
            </el-submenu>
            <!--系统管理-->
            <el-submenu index="6">
              <template slot="title">
                <i class="el-icon-star-on"></i>
                <span>系统管理</span>
              </template>
              <el-menu-item-group>
                <el-menu-item index="">
                  <template slot="title">
                    <i class="el-icon-edit"></i>
                    <span>修改密码</span>
                  </template>
                </el-menu-item>
                <el-menu-item index="">
                  <template slot="title">
                    <i class="el-icon-circle-close"></i>
                    <span>退出登录</span>
                  </template>
                </el-menu-item>
              </el-menu-item-group>
            </el-submenu>
          </el-menu>
        </el-aside>
        <!--下半区域的右侧-->
        <el-main class="layout-main">
          <!-- 由其它视图组件显示 -->
          <router-view/>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<style>
.layout-header {
  background: linear-gradient(to right, #4F94CD, #63B8FF);
}

.layout-header h1 {
  color: #fff;
  line-height: 60px;
}

.layout-body {
  position: absolute;
  top: 60px;
  bottom: 0;
  left: 0;
  right: 0;
}

.layout-aside {
  background: #425c79;
  width: 220px !important;
}

.layout-aside .el-menu {
  border: 0;
}

.layout-aside i {
  color: #fff !important;
}

.layout-main {
  background: #fff;
}

.el-menu-item.is-active {
  background: #2d3c4d !important;
}

</style>